﻿@model MvcWesbNews.Models.DetailNew

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
 <script src="@Url.Content("~/Content/plugin/ckeditor/ckeditor.js")" type="text/javascript"></script>
<style>.abc{border:1px solid #ccc333;width:100%}</style>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>DetailNew</legend>

        @Html.HiddenFor(model => model.NewsID)

        <div class="editor-label">
            @Html.LabelFor(model => model.GroupID, "GroupNew")
        </div>
        <div class="editor-field">
            @Html.DropDownList("GroupID", String.Empty)
            @Html.ValidationMessageFor(model => model.GroupID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Shortcut)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Shortcut)
            @Html.ValidationMessageFor(model => model.Shortcut)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Picture)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Picture)
            @Html.ValidationMessageFor(model => model.Picture)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Body)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Body, new { @id = "ckeContent" })

            <script type="text/javascript">

                CKEDITOR.replace("ckeContent");

            </script>
            @Html.ValidationMessageFor(model => model.Body)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreateDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreateDate)
            @Html.ValidationMessageFor(model => model.CreateDate)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
